Don't un-invalidate area that will be immediately invalidated again.
authorAlexander Larsson <alexl@redhat.com>
Thu, 13 Aug 2009 11:04:28 +0000 (13:04 +0200)
committerAlexander Larsson <alexl@redhat.com>
Thu, 13 Aug 2009 12:46:01 +0000 (14:46 +0200)
When moving an area we move any invalid region in this area to the
new place, but there really is no need to remove the old invalid
area as it would just be invalidated again (being newly exposed).

gdk/gdkwindow.c

index bf56a089a5f225ac564a17e6e2444634a0044243..cfb9d9edc95b8749bca79442db9209579d056676 100644 (file)
@@ -3008,7 +3008,10 @@ move_region_on_impl (GdkWindowObject *private,
       /* Convert from target to source */
       gdk_region_offset (update_area, -dx, -dy);
       gdk_region_intersect (update_area, impl_window->update_area);
-      gdk_region_subtract (impl_window->update_area, update_area);
+      /* We only copy the area, so keep the old update area invalid.
+        It would be safe to remove it too, as code that uses
+        move_region_on_impl generally also invalidate the source
+        area. However, it would just use waste cycles. */
 
       /* Convert back */
       gdk_region_offset (update_area, dx, dy);